<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%
  String path = request.getContextPath();
%>
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>再搜索用户重置密码</title>
<link href="<%=path%>/static/css/all.css?jejwej33we" rel="stylesheet" type="text/css">
<!--[if IE]>
<script>
(function(){if(!/*@cc_on!@*/0)return;var e = "abbr,article,aside,audio,canvas,datalist,details,dialog,eventsource,figure,footer,header,hgroup,mark,menu,meter,nav,output,progress,section,time,video".split(','),i=e.length;while(i--){document.createElement(e[i])}})()
</script>
<![endif]-->
</head>

<body>
<header>
<div id="topnav">
  <div class="topnav">
    <ul>
      <li><a href="<%=path%>/web/garbage/index" title="">首页</a></li>
      <li><a href="#" title="">关于我们</a></li>
      <li><a href="graphers.html" title="">开发团队</a></li>
    </ul>
    <ol>
      <li><a href="<%=path%>/web/userinfo/login">登录</a>/<a href="<%=path%>/web/userinfo/register">注册</a></li>
    </ol>
  </div>
  </div>
</header>
<section>
<div class="wrap">
    <div id="register">
      <div class="logo"><img src="<%=path%>/static/images/registerlogo.png" width="300" height="50" alt="分类搜索"></div>
      <div class="respont">
        <h1>重置密码</h1>
        <form action="<%=path%>/web/userinfo/resetPassword" id="checkCode">
          <ol>
            <li>
              已经将验证码发送至${sessionScope.username}
            </li>
            <li>
              <input name="input6" id="code" type="text" aria-label="输入验证码" placeholder="输入验证码">
              <label><a href="<%=path%>/web/userinfo/sendCode">申请重新发送验证码。</a></label>
            </li>
            <li>
              <input class="submit" name="input6" type="button" value="验证">
            </li>
            <li>如果邮箱不能使用请联系网站管理员<a href="mailto:webmaster@fenlaji.com">webmaster@fenlaji.com</a></li>
          </ol>
        </form>
      </div>
    </div>
  </div>
</div>
</section>
<footer>
  <div id="footer">
    <div id="footernav"> <a href="#">返回顶部</a> <span>|</span> <a href="#">联系方式</a> <span>|</span> <a href="#">网站地图</a> <span>|</span> <a href="#">版权说明</a> </div>
    <div id="copyright">
      <p>copright qingsoft2013 web设计 <a href="HTTP://www.songshuo.com" target="_blank">宋硕设计网站设计工作室</a></p>
    </div>
  </div>
</footer>
<script src="<%=path%>/static/js/jquery-3.3.1.min.js"></script>
<script src="<%=path%>/static/js/layui/layui.all.js"></script>
<script>
  $(".submit").click(function () {
    var code = $("#code").val();
    $.ajax({
      url: "<%=path%>/web/userinfo/checkCode",
      type:"get",
      data: {code:code},
      async: false,
      success: function (data) {
        if (data == "0") {
          layer.msg("验证码不正确", {icon:5});
          return;
        }
        else {
          $("#checkCode").submit();
        }}
    })
  })
</script>
</body>
</html>
